#include <cstdio>
#include <cstring>

#define max_digits 8

class big_integer{
public:
    int digit[max_digits];
    int size;

    void init(){
        for (int i = 0; i < max_digits; i++)
            digit[i] = 0;
        size = 0;
    }

    void set_num(char string[]){
        init();
        int length = strlen(string);
        for (int i = length - 1, count = 0, weight = 1, temp_num = 0; i >= 0; i--){
            temp_num += (string[i] - '0')*weight;
            weight *= 10;
            count++;
            if (count == 4 || i == 0){
                digit[size++] = temp_num;
                temp_num = 0;
                count = 0;
                weight = 1;
            }
        }
    }

    void out_put(){
        for (int i = size - 1; i >= 0; i--){
            if (i != size - 1)
                printf("%04d", digit[i]);
            else
                printf("%d", digit[i]);
        }
        printf("\n");
    }

    big_integer operator / (int x) const{
        big_integer return_num;
        return_num.init();
        int remainder = 0;
        for (int i = size - 1; i >= 0; i--){
            int temp_num = (remainder * 10000 + digit[i]) / x;
            int temp_r = (remainder * 10000 + digit[i]) % x;
            return_num.digit[i] = temp_num;
            remainder = temp_r;
        }
        return_num.size = 0;
        for (int i = 0; i < max_digits; i++){
            if (digit[i] != 0)
                return_num.size = i;
        }
        return_num.size++;
        return return_num;
    }

    int operator % (int x) const{
        int remainder = 0;
        for (int i = size - 1; i >= 0; i--){
            int temp_num = (remainder * 10000 + digit[i]) / x;
            int temp_r = (remainder * 10000 + digit[i]) % x;
            remainder = temp_r;
        }
        return remainder;
    }
} big_num;

int main(int argc, char const *argv[]){
    char intput_string[31];
    while(scanf("%s", intput_string) != EOF){
        big_num.set_num(intput_string);
        int result[120], result_size = 0;
        do {
            int temp_num = big_num % 2;
            result[result_size++] = temp_num;
            big_num = big_num / 2;
        } while(big_num.digit[0] != 0 || big_num.size != 1);
        for (int i = result_size - 1; i >= 0; i--)
            printf("%d", result[i]);
        printf("\n");
    }

    return 0;
}